Skip to content

feat: Planck profile#437

Merged
czareko merged 16 commits into
mainfrom
feat/planck_profile
Apr 8, 2026
Merged

feat: Planck profile#437
czareko merged 16 commits into
mainfrom
feat/planck_profile

Conversation

@czareko
Copy link
Copy Markdown
Collaborator

@czareko czareko commented Mar 16, 2026

Need to evaluate if this is worth doing...

Scheduler: fix Lookup/Agenda consistency for deferred named tasks

When service_task cannot execute a named task (preimage unavailable or temporarily overweight), the task returns to the Agenda for future resolution. Previously the Lookup entry was removed eagerly before the outcome was known, leaving the task unreachable by name -- cancel_named and reschedule_named would both fail with NotFound.

This is a concrete problem for reversible-transfers: if a transfer finalization task is deferred due to block weight pressure, cancel_transfer calls cancel_named which fails, and the transfer executes unhindered despite the user's cancellation attempt.

Changes:

  • service_task: Lookup is now only removed on terminal outcomes (successful dispatch, permanently overweight). Tasks that return to the Agenda keep their Lookup and preimage reference intact.
  • do_cancel_named: Returns NotFound when the Lookup points to an empty or out-of-range Agenda slot, instead of silently succeeding and emitting a false Canceled event.
  • Docs: Added known-limitation section for stranded tasks when preimage is unavailable.

^^^ I had a fix for this decided not to do it - lets add it to issues and possibly address later if we can find an elegant way to do so

czareko and others added 15 commits March 14, 2026 14:55
add nice error messages and checks for the inner hash format
* pull in network sync package

modify to make it disconnect less often

* bugfix

* reset network sync

* Network sync fix 1 (real) (#480)

* original backoff code from PR 190 added

if requests fail, we halve the requested blocks
we don't drop peers quickly

* configure block request timeout

* format

* use single state tx pool

* taplo format

* apply peer drop limit to OutboundFailure::Io

this covers some other class of network error, like received too much data, and a few others, none of these malicious

* renamed RequestSignature to SyncRequestParams

* format

* feature gate external packages tests

---------

Co-authored-by: Nikolaus Heger <nheger@gmail.com>
@czareko czareko marked this pull request as ready for review April 8, 2026 00:22
@czareko czareko merged commit 2d855d6 into main Apr 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants